﻿using mscook.core.domain;
using mscook.core.repositories;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace mscook.core.services
{
    public class SlideService : ISlideService
    {
        private ISlideRepository iSlideRepo;
        public SlideService(ISlideRepository iSlideRepo)
        {
            this.iSlideRepo = iSlideRepo;
        }

        public void SaveOrUpdate(Slide Slide)
        {
            iSlideRepo.SaveOrUpdate(Slide);
        }

        public Slide Get(string id)
        {
            return iSlideRepo.Get(id);
        }

        public IList<Slide> SelectPageList(int start, int limit, out long total)
        {
            return iSlideRepo.SelectPageList(start, limit, out total);
        }

        public bool Delete(string id)
        {
            return iSlideRepo.Delete(id);
        }
    }
}
